import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
// import MytagVue from '@/Mytag.vue'
// import shanchuVue from '@/shanchu.vue'
// import First from '../a/First.vue'
// import second from '../a/second.vue'
// import third from '../a/third.vue'
// import qwer from '../a/qwer.vue'
// import aone from '../ly/a1.vue'
// import atwo from '../ly/a2.vue'
// import athree from '../ly/a3.vue'
import denglu from '../mianjing/denglu.vue'
import layout from '../mianjing/layout.vue'
import zhuce from '../mianjing/zhuce.vue'
import shouye from '../mianjing/sub/shouye.vue'
import shoucang from '../mianjing/sub/shoucang.vue'
import xihuan from '../mianjing/sub/xihuan.vue'
import wode from '../mianjing/sub/wode.vue'
import tiaoVue from '@/mianjing/tiao.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'layout',
    redirect:'/shouye',
    component: layout,
    children:[
      {
      path: '/shouye',
      name: 'shouye',
      component: shouye,
      meta:{
        keepAlive:true
      }
    },
    {
      path: '/shoucang',
      name: 'shoucang',
      component: shoucang
    },
    {
      path: '/xihuan',
      name: 'xihuan',
      component: xihuan
    },
    {
      path: '/wode',
      name: 'wode',
      component: wode
    },
  ]
  },
  {
    path: '/zhuce',
    name: 'zhuce',
    component: zhuce
  },
    {
    path: '/denglu',
    name: 'denglu',
    component: denglu
  },
  {
    path: '/tiao/:id',
    name: 'tiao',
    component: tiaoVue
  },
  // {
  //   path: '/',
  //   name: 'one',
  //   component: aone
  // },
  // {
  //   path: '/two',
  //   name: 'two',
  //   component: atwo
  // },
  // {
  //   path: '/three',
  //   name: 'three',
  //   component: athree
  // },
  // {
  //   path: '/',
  //   name: 'First',
  //   redirect:'/qwer',
  //   component: First
  // },
  // {
  //   path: '/second',
  //   name: 'second',
  //   component: second
  // },
  // {
  //   path: '/third',
  //   name: 'third',
  //   component: third
  // },
  // {
  //   path: '*',
  //   name: 'qwer',
  //   component: qwer
  // },
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/tag',
  //   name: 'tag',
  //   component: MytagVue
  // },
  // {
  //   path: '/shan',
  //   name: 'shan',
  //   component: shanchuVue
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  linkActiveClass: 'aa',
  linkExactActiveClass: 'cc',
  mode:'hash',
  routes
})

export default router
